import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import store from './store'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.less';
import '@/util/globalComponent'
import '@/style/index.less'
import './router/permission'
import site from '@/config/site'
import { Icon } from 'ant-design-vue';
import { getTime,dealDic } from "@/util/common";
import './mock'

// 图片预览插件
import Viewer from "v-viewer";
import "viewerjs/dist/viewer.css";

// iconfont
let IconFont = [];
site.iconfontUrlArr.forEach((item,idx)=>{
  IconFont[idx] = Icon.createFromIconfontCN({
    scriptUrl: item
  })
  Vue.component('IconFont', IconFont[idx])
})

// 时间戳转换
Vue.prototype.$getTime = getTime;
//处理字典标签
Vue.prototype.$dealDic = dealDic;

//使用vxe-table
import {
  Icon as vxeIcon,
  Column,
  Header,
  Table,
  Grid
} from 'vxe-table'

Vue.use(Table)
.use(Column)
.use(Header)
.use(Grid)
.use(vxeIcon)


Vue.use(Viewer);
Vue.use(Antd)
Vue.prototype.site = site
Vue.config.productionTip = false

export default new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
